<!-- 金币兑换区域轮播内容 -->
<template>
	<view class="list flex flex-wrap justify-between">
		<view class="item" v-for="(it,index) in items" :key="index">
			<view class="imgs">
				<view class="img">
					<image :src="it.exchangeCommodityImage"
						mode=""></image>
				</view>
			</view>
			<view class="title">
				{{it.exchangeCommodityName}}
			</view>
			<view class="price flex justify-between align-center">
				<view class="num flex justify-between align-center">
					<text class="count">{{it.goldNum}}</text>
					<text class="name">积分</text>
				</view>
				<view class="btn flex justify-center align-center" @click="buy(it)">
					立即兑换
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "coinsList",
		data() {
			return {

			};
		},
		props:{
			items: Array
		},
		methods:{
			buy(e){
				this.$emit('exchange',e)
			}
		}
	}
</script>

<style lang="scss">
	.list {
		padding: 0 30rpx;
		.item {
			line-height: 1;
			width: 300rpx;
			height: 412rpx;
			background: #FFFFFF;
			border-radius: 8rpx;
			padding: 25rpx;
			margin-top: 30rpx;

			.imgs {
				height: 225rpx;

				.img {
					width: 100%;
					height: 100%;
				}
			}

			.title {
				margin-top: 28rpx;
				font-weight: 500;
				color: #333333;
				font-size: 24rpx;
				height: 50rpx;
				line-height: 1.3;
			}

			.price {
				margin-top: 30rpx;

				.num {
					.count {
						font-weight: bold;
						color: #FF7916;
						font-size: 40rpx;
					}

					.name {
						color: #999999;
						font-size: 24rpx;
						margin-left: 10rpx;
					}
				}

				.btn {
					width: 114rpx;
					height: 34rpx;
					background: linear-gradient(135deg, #FFA516, #F85800);
					border-radius: 17px;
					font-weight: 500;
					color: #FEFEFE;
					font-size: 22rpx;
				}
			}
		}
	}
</style>
